#include<stdio.h>
int main()
{
  int sum=0,x;
  scanf("%d",&x);
  while(x!=1)
  {
	if(x%2==0)
	{
		x/=2;
		sum++;
	}
	else
	{
		x=(x*3+1)/2;
			sum++;
	}
  }
  printf("%d\n",sum);
  return 0;
}